<?php
/**
 * Created by PhpStorm.
 * User: WUHENG
 * Date: 2022/10/10
 * Time: 20:26
 */

namespace app\index\controller;


use app\index\model\Article;
use app\index\model\Type;
use think\Controller;

class Wechat extends Controller
{
    public function getArticle(){
        $data = Type::where('tID','neq',0)->select();
        foreach ($data as $v){
            $v->getArt;
        }
//        dump($data);
        return json_encode($data);
    }
    public function getAtr(){
        $id = input('get.id');
        $res = Article::where('artID',$id)->find();
        return json_encode($res);
    }
}